package java_persistence;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import domain.SystemAdministrator;


public interface SystemAdministratorMapper {

	// CREATES
	
	/**Promotes a user to being a sysadmin within the database.
	 * @param u the username of the user to promote
	 */
	public void create_sysadmin(@Param("username") String u);
	
	// RETRIEVES
	
	/**Retrieves a list of SystemAdministrators from the database
	 * @return the list of SystemAdministrators including associatd user information
	 */
	public List<SystemAdministrator> get_sysadmins();
	/**Retrieves a sysadmin from the database by username u.
	 * @param u the username
	 * @return the SystemAdministrator object including user information, null if user DNE or isn't a sysadmin.
	 */
	public SystemAdministrator get_sa_by_username(@Param("username") String u);
	
	// UPDATES
	
	// DELETES
	
	/**Demotes a user from being a system administrator but does not delete the user.
	 * @param u the username of the sysadmin to demote.
	 */
	public void delete_sysadmin(@Param("username") String u);
	
	
}
